home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950329-19950528 / 000200_news@columbia.edu_Fri Apr 21 03:27:37 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  7KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA11686
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Sat, 22 Apr 1995 08:26:04 -0400
  3. Received: by apakabar.cc.columbia.edu id AA25475
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Sat, 22 Apr 1995 08:26:02 -0400
  5. Path: news.columbia.edu!sol.ctr.columbia.edu!howland.reston.ans.net!spool.mu.edu!torn!news.uunet.ca!uunet.ca!torrie!gordon
  6. From: gordon@torrie.org (Gordon Torrie)
  7. Newsgroups: comp.protocols.kermit.misc
  8. Subject: Re: MS-Kermit <--> VMS Kermit ?
  9. Summary: You need a Kermit script. Here it is.
  10. Message-Id: <q9NV4c1w165w@torrie.org>
  11. Date: Thu, 20 Apr 95 23:27:37 -0400
  12. References: <95109.135856HDK@psuvm.psu.edu>
  13. Organization: Torrie Communication Services
  14. Lines: 185
  15. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  16.  
  17. H. D. Knoble <HDK@psuvm.psu.edu> writes:
  18.  
  19. | In article <1995Apr19.065916.1@iccgcc.cle.ab.com>, principe@iccgcc.cle.ab.com
  20. | (Tony Principe) says:
  21. | >I am using MS Kermit 3.12 to transfer files between my PC and a VAX. The
  22. | >VAX Kermit is Kermit-32 version 3.3.128. Although ascii file transfers
  23. | >work ok, I haven't had any luck with transferring binary files in either
  24. | >direction. I'm not sure if the problem is on the PC end or the VMS end.
  25. | >Is there a particular setup that I need? I've set file type is binary on
  26. | >the sending Kermit.
  27. | The solution is to use C-Kermit for VMS.
  28.  
  29. No it is not. 
  30. While C-Kermit undoubtedly has advantages over Kermit-32, 
  31. Kermit-32 is not the problem. 
  32.  
  33. The solution is to create a Kermit script that 
  34. MS-Kermit then runs. I have done this and include it below.
  35. This script is currently used by several people at work to 
  36. successfully transfer files between MS-Kermit 3.12 and 
  37. Kermit-32 3.3.128.  These file transfers proceed correctly and 
  38. quickly even though the users are all connected to the VAX via 
  39. terminal servers (DECserver 100s). 
  40.  
  41. Note that you must have ANSI.SYS device driver loaded otherwise 
  42. the menus will not display properly. The script could be altered 
  43. if you really don't want to load ANSI.SYS.
  44.  
  45. ;  VAX/VMS Kermit-32 <-> IBM PC File Transfer setup
  46. ;  Requires MS-Kermit 3.00
  47. ;  Gordon Torrie  February 1990
  48. ;
  49. ;  July 10, 1991 - Changed the packet length from 94 to 300.
  50. ;                  Acquired Kermit-32 version 3.3.128 to replace
  51. ;                  version 3.3.117 on the VAX.  The new version 
  52. ;                  supports long packets so we will make use of them.
  53. ;
  54. ;  June 20, 1992 - Changed the packet length from 300 to 1000.
  55. ;
  56. ;  Sept 11, 1994 - Added Blocksize input for Fixed length files.
  57. ;                  (To upload BACKUP saveset files with the
  58. ;                  correct blocksize).
  59. ;
  60. ;  Note:  The VAX is assumed to be at the dollar prompt on entry
  61. ;         to this procedure.
  62. ;         This procedure returns the VAX to the dollar prompt on
  63. ;         exit.
  64. SET TAKE-ECHO OFF                 ; Don't echo this file
  65. SET INPUT ECHO OFF
  66. OUTPUT \26;                       ; Ensure we are at the dollar prompt
  67. :FTPMENU1
  68. ECHO {\27[2J           \27[4mVAX <--> PC File Transfer Setup\27[m\13\10}
  69. ECHO {         \27[1mA\27[m = Text files (Ordinary ASCII)\13\10}
  70. ECHO {         \27[1mB\27[m = Binary files (No translation)\13\10}
  71. ECHO {         \27[1mF\27[m = Fixed-length-record files\13}
  72. ECHO {             (Special type of binary file)\13\10}
  73. ECHO {         \27[1mX\27[m = Exit from this procedure\13\10
  74. :FTPSTART
  75. ASK \%z {Which type of file? \27[K}
  76. IF NOT DEFINED \%z GOTO FTPSTART
  77. SET INPUT CASE IGNORE             ; Ignore case of user-input
  78. IF EQUAL \%z A GOTO FTPASC
  79. IF EQUAL \%z B GOTO FTPBIN
  80. IF EQUAL \%z F GOTO FTPFIX
  81. IF EQUAL \%z X POP
  82. ECHO \27[1mInvalid response.\27[m  Choose one of \27[1\{59}5mA, B, F, \27[mor \27[1\{59}5mX\27[m.\13
  83. PAUSE 3                           ; Give user time to read
  84. ECHO \13\27[1A\27[K\27[2A         ; Erase the message
  85. GOTO FTPSTART
  86.  
  87. ;  For Text files
  88. :FTPASC
  89. ECHO {Wait one moment\13\10}
  90. OUTPUT KERMIT\13                  ; Start Kermit-32
  91. INPUT Kermit-32>                  ; Wait for it's prompt
  92. CLEAR                             ; Clear the input buffer
  93. OUTPUT {SET PARITY NONE\13}
  94. INPUT Kermit-32>
  95. CLEAR
  96. OUTPUT {SET FILE TYPE ASCII\13}
  97. INPUT Kermit-32>
  98. CLEAR
  99. GOTO SERVE
  100.  
  101. ;  For Binary Files
  102. :FTPBIN
  103. ECHO {Wait one moment\13\10}
  104. OUTPUT KERMIT\13                  ; Start Kermit-32
  105. INPUT Kermit-32>                  ; Wait for it's prompt
  106. CLEAR                             ; Clear the input buffer
  107. OUTPUT {SET PARITY SPACE\13}
  108. INPUT Kermit-32>
  109. CLEAR
  110. OUTPUT {SET FILE TYPE BINARY\13}
  111. INPUT Kermit-32>
  112. CLEAR
  113. SET PARITY SPACE
  114. SET FILE TYPE BINARY
  115. GOTO SERVE
  116.  
  117. ;  For files with Fixed Length Records such as executable images and
  118. ;  BACKUP savesets.
  119. :FTPFIX
  120. DEFINE \%z
  121. ASK \%z {Blocksize to use? (Default is 512) \27[K}
  122. IF NOT DEFINED \%z DEFINE \%z 512 ; Set default blocksize if none specified
  123. IF LLT {\%z} 9 GOTO FTPFIX_GO     ; Check that a numeric value was specified
  124. ECHO \27[1mInvalid response.\27[m  Blocksize must be numeric.\13
  125. PAUSE 3                           ; Give user time to read
  126. ECHO \13\27[1A\27[K\27[2A         ; Erase the message
  127. GOTO FTPFIX
  128.  
  129. :FTPFIX_GO
  130. ECHO {Wait one moment\13\10}
  131. OUTPUT KERMIT\13                  ; Start Kermit-32
  132. INPUT Kermit-32>                  ; Wait for it's prompt
  133. CLEAR                             ; Clear the input buffer
  134. OUTPUT {SET PARITY SPACE\13}
  135. INPUT Kermit-32>
  136. CLEAR
  137. OUTPUT {SET FILE TYPE FIXED\13}
  138. INPUT Kermit-32>
  139. CLEAR
  140. OUTPUT {SET FILE BLOCKSIZE \%z\13}
  141. INPUT Kermit-32>
  142. CLEAR
  143. SET PARITY SPACE
  144. SET FILE TYPE BINARY
  145.  
  146. :SERVE
  147. ;  Set parameters common to all file type transfers
  148. :FTPCOM
  149. OUTPUT {SET BLOCK_CHECK_TYPE 3\13}
  150. INPUT Kermit-32>
  151. CLEAR
  152. OUTPUT {SET RECEIVE PACKET_LENGTH 1000\13}
  153. INPUT Kermit-32>
  154. CLEAR
  155. OUTPUT {SET SEND PACKET_LENGTH 1000\13}
  156. INPUT Kermit-32>
  157. CLEAR
  158. OUTPUT {SET FILE NAMING NORMAL_FORM\13}
  159. INPUT Kermit-32>
  160. CLEAR
  161. OUTPUT {SET SERVER_TIMER 0\13}
  162. INPUT Kermit-32>
  163. CLEAR
  164. OUTPUT SERVER\13                  ; Put Kermit-32 in server mode
  165. CLEAR
  166. ;
  167. :FTPMENU2
  168. ECHO {\27[2J           \27[4mVAX <--> PC File Transfer Setup\27[m\13\10}
  169. ECHO {         \27[1mG\27[m = Get a file from the VAX\13\10}
  170. ECHO {         \27[1mS\27[m = Send a file to the VAX\13\10}
  171. ECHO {         \27[1mX\27[m = Exit to previous menu.\13\10}
  172. :FTPFUNC
  173. ASK \%z {Which function? \27[K}
  174. IF NOT DEFINED \%z GOTO FTPFUNC
  175. IF EQUAL \%z X GOTO FTPEXIT
  176. IF EQUAL \%z G GOTO FTPNAME
  177. IF EQUAL \%z S GOTO FTPNAME
  178. ECHO \27[1mInvalid response.\27[m  Choose one of \27[1\{59}5mG, S, \27[mor \27[1\{59}5mX\27[m.\13
  179. PAUSE 3                           ; Give user time to read
  180. ECHO \13\27[1A\27[K\27[2A         ; Erase the message
  181. GOTO FTPFUNC
  182. ;
  183. :FTPNAME
  184. ASK \%y {Name of file: }
  185. IF NOT DEFINED \%y GOTO FTPNAME
  186. IF EQUAL \%z G GET \%y
  187. IF EQUAL \%z S SEND \%y
  188. PAUSE 1                          ; Give user a chance to read
  189. ;                                  any error messages
  190. GOTO FTPMENU2
  191. ;
  192. :FTPEXIT
  193. FINISH                           ; Exit Kermit-32 Server mode
  194. OUTPUT EXIT\13                   ; Exit Kermit-32
  195. GOTO FTPMENU1                    ; and go to first menu
  196.  
  197.  
  198. --
  199. gordon@torrie.org                      Gord Torrie